/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.nuage.tiow.bo;

/**
 *
 * @author quentina
 */
public class DiceManager {

    public static int rollD6() {
        int d6 = ((int) Math.round(Math.random() * 5)) + 1;
        System.out.println("Roll: " + d6);
        return d6;
    }

    public static int rollD3() {
        int d6 = rollD6();
        return d6 == 1 || d6 == 2 ? 1 : d6 == 3 || d6 == 4 ? 2 : 3;
    }

    public static boolean plusFour() {
        return rollD6() >= 4;
    }
}
